package com.welkom.everydate.web;

import java.util.List;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.welkom.everydate.domain.Company;
import com.welkom.everydate.domain.User;
import com.welkom.everydate.services.interfaces.CompanyService;

import javax.annotation.Resource;
@Controller
public class CustomerManagement {
	@Resource
	CompanyService companyService;
	@RequestMapping("/customerManagement.html")
	public String customerManagement(Model model){
		return "business/companyManagement/index";
	}
	
	
	@RequestMapping("/getAllCompanys.html")
	@ResponseBody
	public List<Company> getAllCompanys(){
		 List<Company> companys=companyService.getAllCompanys(); 
		 return companys;
	}
}
